//
//  LTools.h
//  CCXYQroject0
//
//  Created by a on 16/9/9.
//  Copyright © 2016年 a. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef void(^versionBlock)(BOOL isNewVersion,NSString *updateUrl,NSString *updateContent);//版本更新

@interface LTools : NSObject

{
    NSString *_downUrl;//更新地址

}


/**
 *  版本更新
 */
+ (void)versionForAppid:(NSString *)appid Block:(void(^)(BOOL isNewVersion,NSString *updateUrl,NSString *updateContent))version;//是否有新版本、新版本更新下地址
#pragma mark - alert 提示
+ (void)alertText:(NSString *)text viewController:(UIViewController *)vc;
+ (void)showMBProgressWithText:(NSString *)text addToView:(UIView *)aView;

#pragma mark - NSUserDefault 缓存

/**
 *  NSUserDefault 缓存
 */
//存 Bool
+ (void)storage:(BOOL)dataornot ForKey:(NSString *)key;
//取 Bool
+ (BOOL)storageForKey:(NSString *)key;

//存
+ (void)cache:(id)dataInfo ForKey:(NSString *)key;
//取
+ (id)cacheForKey:(NSString *)key;
//退出后需要存储的
+ (void)cacheSave:(NSArray *)keyAry;

#pragma - mark 验证邮箱、电话等有效性

/*手机及固话*/
+ (BOOL)isValidateMobile:(NSString *)mobileNum;

@end
